home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / ansi / hppa / stdarg.h < prev    next >
C/C++ Source or Header  |  1994-06-20  |  798b  |  33 lines

  1. #ifndef _ANSI_HPPA_STDARG_H_
  2. #define _ANSI_HPPA_STDARG_H_
  3.  
  4. #define _DEFINE_VA_LIST
  5. #include <ansi/hppa/stdtypes.h>
  6.  
  7. /* Indicate that this program uses <stdarg.h>. */
  8. #define __STDARG__
  9.  
  10. #define __stdarg_rounded_size(TYPE)  \
  11.   ((sizeof (TYPE) + sizeof (int) - 1) & ~(sizeof(int)-1))
  12.  
  13. /* BSD compatibility: if `#include <varargs.h>' was encountered, don't
  14.  * redefine the macros. */
  15.  
  16. #ifndef va_start
  17. #define va_start(list,parmN) \
  18.     (void)((list) = ((char *)__builtin_saveregs()))
  19. #endif va_start
  20.  
  21. #ifndef va_end
  22. #define va_end(list) \
  23.     (void)((list) = (char *)0)
  24. #endif va_end
  25.  
  26. #ifndef va_arg
  27. #define va_arg(list, type) \
  28.     (*(type *)((list) = (va_list)((unsigned)((list) -__stdarg_rounded_size(type)) & ~(__stdarg_rounded_size(type)-1))))
  29. #endif va_arg
  30.  
  31.  
  32. #endif    /* _ANSI_HPPA_STDARG_H_ */
  33.